package com.jhsw.roadsun.module.business.controller.admin.expressage.vo;

import cn.idev.excel.annotation.ExcelProperty;
import com.jhsw.roadsun.module.business.controller.admin.expressagegoods.vo.ExpressageGoodsUpdateVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 寄件信息新增/修改 Request VO")
@Data
public class ExpressageSaveReqVO {

    @Schema(description = "寄件ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9001")
    private Long id;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3522")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "收件国家", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "收件国家不能为空")
    private String country;

    @Schema(description = "运输方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "运输方式不能为空")
    private String shippingType;

    @Schema(description = "是否报关（0否 1是）")
    private Boolean customsFiling;

    @Schema(description = "寄件人姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotEmpty(message = "寄件人姓名不能为空")
    private String sendName;

    @Schema(description = "寄件人手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "寄件人手机号不能为空")
    private String sendMobile;

    @Schema(description = "寄件人详细地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "寄件人详细地址不能为空")
    private String sendAddress;

    @Schema(description = "寄件人公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "寄件人公司名称不能为空")
    private String sendCompany;

    @Schema(description = "寄件人所属部门")
    private String sendDept;

    @Schema(description = "收件人姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "收件人姓名不能为空")
    private String recipientsName;

    @Schema(description = "收件人手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "收件人手机号不能为空")
    private String recipientsMobile;

    @Schema(description = "收件人详细地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "收件人详细地址不能为空")
    private String recipientsAddress;

    @Schema(description = "收件人公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "收件人公司名称不能为空")
    private String recipientsCompany;

    @Schema(description = "收件人所属部门")
    private String recipientsDept;

    @Schema(description = "付款方式（0寄付 1到付 2第三方结款）（字典：business_expressage_pay_method）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "付款方式不能为空")
    private Integer payMethod;

    @Schema(description = "客户账号", example = "6085")
    private String customerAccount;

    @Schema(description = "发票号")
    private String invoiceNum;

    @Schema(description = "快递单号")
    private String expressageOrder;

    @Schema(description = "审核状态（0未处理 1已出单 2已取消）（字典：business_expressage_audit_status）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "审核状态不能为空")
    private Integer auditStatus;

    @Schema(description = "审核时间")
    private LocalDateTime auditDatetime;

    @Schema(description = "审核人ID", example = "10616")
    private Long auditAdminUserId;

    @ExcelProperty("货物信息")
    @NotNull(message = "货物信息不能为空")
    @Size(min = 1, message = "货物信息不能为空")
    private List<ExpressageGoodsUpdateVO> goods;
}